import { request } from 'umi';

/**
 * 重启电脑
 */
export const restart = (server: string) => {
  return request(`${server}/system/restart`);
};

/**
 * 重启软件
 */
export const relaunch = (server: string) => {
  return request(`${server}/system/relaunch`);
};

/**
 * 检查更新
 */
export const checkUpdate = (server: string) => {
  return request(`${server}/system/checkUpdate`);
};

/**
 * 网络校时
 * @param server
 * @param url
 */
export const networkTiming = (server: string, url: string) => {
  return request(`${server}/system/networkTiming`, { params: { url } });
};
